/*
 * BaseObject.h
 *
 *  Created on: 2010-11-3
 *      Author: Administrator
 */

#ifndef BASEOBJECT_H_
#define BASEOBJECT_H_

#include <e32base.h>

class CEngine;
class Canvas;

typedef struct tagRect	RECT;
struct tagRect
{
	TInt nLeft, nTop, nWidth, nHeight;
};
typedef struct tagPoint	POINT;
struct tagPoint
{
	TInt x,y;
};
#define	RECT2Rect(rect)		TRect(TPoint(rect.nLeft, rect.nTop), TSize(rect.nWidth, rect.nHeight))
#define	POINT2Point(point)	TPoint(point.x, point.y)
#define	POINT2Size(point)	TSize(point.x, point.y)


class CBaseObject
	{
public:
	CBaseObject(CEngine* pEngine);
	virtual ~CBaseObject();

	CEngine* GetEngine();
	Canvas* GetCanvas();
private:
	CEngine* iEngine;
	Canvas* iCanvas;
	};

#endif /* BASEOBJECT_H_ */
